import React from "react";
import { createRoot } from "react-dom/client";
import { store } from "@/store";
import { Provider as ReduxProvider } from "react-redux";

import "@/styles/index.css";
import App from "./App.tsx";

const root = document.getElementById("root");

/**
 * React.StrictMode 严格模式
 * react的函数组件每次渲染会执行两次
 */

createRoot(root!, {
  identifierPrefix: "my-app-", // useId前缀
}).render(
  <React.StrictMode>
    <ReduxProvider store={store}>
      <App />
    </ReduxProvider>
  </React.StrictMode>
);
